export async function getContainerHeight(containerName = '') {
  return new Promise((resolve, reject) => {
    my.createSelectorQuery()
      .select(containerName)
      .boundingClientRect()
      .exec(res => {
        // console.log('查询原始结果：', res);
        if (res && res[0]) {
          const height = res[0].height;
          console.log(`容器${containerName}高度为${height}`);
          resolve(height); 
        } else {
          console.log(`无法获取容器${containerName}高度`);
          resolve(null); 
        }
      });
  });
}